#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <limits.h>
#include "dominion.h"

void testing(struct gameState* game);
void init(struct gameState *game);
void check(char *foo, int bar, int ans);

int main(int argc, char *argv[]){
	struct gameState *game = malloc(sizeof(struct gameState));

	init(game);
	testing(game);
	free(game);
	return 0;
}

void testing(struct gameState* game){
	int current_plyr = 1;
	int *choice = malloc(sizeof(int) * 3);
	check("numBuys", 1, game->numBuys);//set number of buys 
	
	 
	check("Coins", 4, game->coins);

	cardEffect(baron, 0, 0, 0, game, 0, 0);//Check card effect of baron 

	check("numBuys", 2, game->numBuys);
	
	
	check("Coins", 4, game->coins);

	free(choice);

	printf("TESTS COMPLETE.\n");

	return;
}

void init(struct gameState *game){
	int random = rand() % (INT_MAX -1) +1;
	int *l = malloc(sizeof(int) * 10);
	l = kingdomCards(0,1, 2, 3, 4, 5, 6, 7, 8, 9);
	initializeGame(2, l, random, game);

	return; 
}

void check(char *foo, int bar, int ans){
	if(bar == ans){
		printf("%s PASSED, VALUE: %d, EXPECTED: %d\n", foo, ans, bar);
	}else{
		printf("%s FAILED, VALUE: %d, EXPECTED: %d\n", foo, ans, bar);
	}
}










